package com.xiaojian.pick.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.github.pagehelper.Page;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * @author whycode
 * @title: CommodityComment
 * @projectName campus-secondary-market-app---sys
 * @description: TODO
 * @date 2022/3/2510:34
 */

@Data
@Accessors(chain = true)
public class CommodityComment {
    private Integer id;
    private Integer cid           ; //动态id
    private Integer uid           ; //用户ID
    private String uname         ; //用户昵称
    private String avatar        ; //用户头像
    private String context       ; //评论内容
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date time          ; //发布时间
    private Integer replyId      ; //回复评论的根节点(0代表是评论的根节点)
    private Integer replyUid     ; //回复的对象的id
    private String replyUname   ; //回复的对象的昵称


    @TableField(exist = false)
    private List<CommodityComment> children;

    //是否显示
    @TableField(exist = false)
    private boolean show;
}
